package com.toutiao.model

import scala.collection.mutable.{HashMap => HMap}

class TimeDict {
  
  private
  val mData = new HMap[String,String]
  
  def apply(k:String) = mData(k)
  
  def isIn(n:String) = {
    mData.contains(n)
  }

  def insert(k:String,v:String) {
    mData(k) = v
  }
    
  def remove(k:String) {
    mData.remove(k)
  }
  
  def removeTime(t:String) {
    val xs = mData.filter(_._2 == t).keySet
    xs.foreach(remove)
    xs.size
  }  

}
